<template>
  <div class="topicList">
    <div class="title">
      <span>专题精选</span>
      <span class="more">更多专题精选<span>></span></span>
    </div>
    <div class="box">
      <div class="item" v-for="item in topicList" :key="item.id">
        <img :src="item.picUrl" />
        <i id="title">{{ item.title }}</i>
        <i id="subtitle">{{ item.subtitle }}</i>
      </div>
    </div>
  </div>
</template>

<script setup>
defineProps(['topicList'])
</script>

<style scoped>
.topicList {
  background-color: #fff;
}
.title {
  width: 90%;
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
}
.box {
  display: grid; 
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 20px;
  /* margin: 10px; */
  margin-bottom: 60px;
  color: #ab956d;
}
.item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
img {
  width: 100%;
  /* border: 1px solid #000; */
}
#title {
  font-size: 15px;
}
#subtitle {
  font-size: 10px;
}
.more{
  font-size: 14px;
  color: gray;
}
</style>
